<!--
 * @Description: 伸缩盒布局
 * @Author: rendc
 * @Date: 2021-06-29 09:13:41
 * @LastEditors: rendc
 * @LastEditTime: 2021-06-29 09:18:59
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>伸缩盒布局</title>
  <style>
    .section {
      display: flex;
    }

    .mydiv {
      height: 200px;
      border: 1px solid yellowgreen;
    }

    #one {
      flex: 1;
    }

    #two {
      flex: 2;
    }

    #three {
      flex: 1;
    }
  </style>
</head>

<body>
  <div class="section">
    <div id="one" class="mydiv">1</div>
    <div id="two" class="mydiv">2</div>
    <div id="three" class="mydiv">3</div>
  </div>
</body>

</html>